package view.ui
{
	import flash.display.MovieClip;
	import flash.display.Loader;
	import flash.net.URLRequest;
	
	/**
	 * ...
	 * @author 
	 * Scene类用于加载场景，函数需要两个参数，第一个是表示玩家到了第几关，第二参数表示玩家到了本关的第几部分;
	 * 
	 */
	public class Scenes extends MovieClip 
	{
		public var ldrBgBack:Loader;
		public var ldrBgFront:Loader;
		public function Scenes(level:int,section:int) 
		{
			//设置路径
			var urlBgBack:String = "../lib/image/bgBack";
			urlBgBack = urlBgBack + level + ".png";
			var urlBgFront:String = "../lib/image/bgFront";
			urlBgFront = urlBgFront + level + section + ".png";
			//加载图片
			ldrBgBack = new Loader();
			ldrBgBack.load(new URLRequest(urlBgBack));
			ldrBgFront = new Loader();
			ldrBgFront.load(new URLRequest(urlBgFront));
			this.addChild(ldrBgBack);
			this.addChild(ldrBgFront);
			this.setChildIndex(ldrBgBack,0);
		}
		
	}

}